<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // like array 类数组
      let obj = {
        0: "Hello",
        1: "world!",
        length: 2,
      };
      obj.join = Array.prototype.join;
      console.log(obj.join("-"));
      // console.log(Array.prototype.join.call(obj, "-"));
      // console.log([].join.call(obj, "-"));
    </script>
  </body>
</html>
